/**
 * Created by henian.xu on 2018/11/5.
 *
 */

const Service = require('egg').Service;

class RegionService extends Service {
    constructor(ctx) {
        super(ctx);
        this.baseUrl = this.config.javaServer.url;
    }

    async getChild() {
        const json = await this.ctx.curl(`${this.baseUrl}/rpc/comm/rs/region/getChild`, {
            dataType: 'json',
        });
        return json.data.data;
    }
}

module.exports = RegionService;
